package strategy;

import java.util.ArrayList;


/**
 *
 * @author Kam
 */
public abstract class Strategy implements Runnable {
    //counter wątków
    protected String mNazwaAlgorytmu;
    //counter wątków
    protected static int mCounter = 0;
    //index wątku
    protected int mIndex;
    //wybrany string
    protected String mSpecial;
    //reszta stringów
    protected ArrayList<String> mOtherStrings;

    public Strategy(String tempSpecial, ArrayList<String> tempOtherStrings) {
        this.mIndex = mCounter;
        mCounter++;
        this.mSpecial = tempSpecial;
        this.mOtherStrings = tempOtherStrings;
        System.out.println("Watek porównywania "+mIndex+" zaczyna prace");
    }

    protected abstract void update();

    protected abstract void end();
    

    public void set(String pmSpecial, ArrayList<String> pmOtherStrings) {
        mOtherStrings = pmOtherStrings;
        mSpecial = pmSpecial;
    }
    public String getNazwaAlgo()
    {
        return mNazwaAlgorytmu;
    }
    public int getIndex()
    {
        return mIndex;
    }
}
